﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.CMS263.BLL;
using Com.CMS263.PO;
using Com.CMS263.Util;

namespace Com.CMS263.Web.manage.MarryInfo
{
    public partial class MarryImageList : System.Web.UI.Page
    {
        public int page = 1;
        int pageSize = 20;
        public int count;
        public int marryId;
        public MarryShowBLL msBll = new MarryShowBLL();
        public MarryShow ms = new MarryShow();
        MarryImageBLL miBll = new MarryImageBLL();
        public IList<MarryImage> miList = new List<MarryImage>();
        protected void Page_Load(object sender, EventArgs e)
        {
            page = Convert.ToInt32(Request.QueryString.Get("page"));
            if (page <= 0)
            {
                page = 1;
            }
            marryId= int.Parse(Request["id"]);
            ms = (MarryShow)msBll.FindModelById("MarryShow", marryId);
            miList = miBll.FindModelByMarryId(marryId,page,pageSize);
            count = miBll.GetResultCountByMarryId(marryId);

        }
        //电视台分页
        public string GetPager()
        {           
            if (count == 0)
            {
                return "暂时没有数据";
            }
            else
            {
                return EnPager.GetNumPager(5, count, pageSize, page, "");
            }
        }
    }
}
